# demo01_func.py
# 形式参数(默认参数)     实际参数(位置传参, 关键字传参)
# ps: 关键字传参一定要放在位置传参的后面
def get_info(name, age=25):
    print(f"name: {name}, age: {age}")
if __name__ == '__main__':
    get_info("nfx")  # name = "nfx", age = 25
    get_info("nfx", 20)  # name = "nfx", age = 20
    get_info(20, "nfx")  # name = 20, age = "nfx"
    # 关键字传参: 指名道姓传参
    # get_info(name="nfx", 20)
    # print("hello", sep=", ", 100, end="!\n") 报错
    get_info("nfx", age=20)
    get_info(name="nfx", age=20)
    get_info(age=20, name="nfx")
